package com.example.xyblog.Service;


import com.example.xyblog.Model.Articleinfo;
import com.example.xyblog.Model.Userinfo;
import com.example.xyblog.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public int addUser(String url,String address,String username,String password){
        return userMapper.addUser(url,address,username,password);
    }

    public Userinfo loginChk(String username){
        return userMapper.loginChk(username);
    }

    public List<Articleinfo> countBlogs(Integer uid){
        return userMapper.countBlogs(uid);
    }

    public Userinfo getUser(Integer uid){
        return userMapper.getUser(uid);
    }
}
